home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / ftp / RCS / ftp_var.h,v < prev    next >
Encoding:
Text File  |  1989-07-27  |  4.3 KB  |  153 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     89.07.26.23.48.53;  author rab;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     89.07.26.23.42.08;  author rab;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 1.2
  25. log
  26. @Fixed void pointers for ds3100.
  27. @
  28. text
  29. @/*
  30.  * Copyright (c) 1985 Regents of the University of California.
  31.  * All rights reserved.
  32.  *
  33.  * Redistribution and use in source and binary forms are permitted
  34.  * provided that this notice is preserved and that due credit is given
  35.  * to the University of California at Berkeley. The name of the University
  36.  * may not be used to endorse or promote products derived from this
  37.  * software without specific prior written permission. This software
  38.  * is provided ``as is'' without express or implied warranty.
  39.  *
  40.  *    @@(#)ftp_var.h    5.4 (Berkeley) 3/14/88
  41.  */
  42.  
  43. #ifndef __STDC__
  44. /* The  ds3100  C compiler can't handle pointers to void */
  45. #define void int
  46. #endif
  47.  
  48. /*
  49.  * FTP global variables.
  50.  */
  51.  
  52. /*
  53.  * Options and other state info.
  54.  */
  55. int    trace;            /* trace packets exchanged */
  56. int    hash;            /* print # for each buffer transferred */
  57. int    sendport;        /* use PORT cmd for each data connection */
  58. int    verbose;        /* print messages coming back from server */
  59. int    connected;        /* connected to server */
  60. int    fromatty;        /* input is from a terminal */
  61. int    interactive;        /* interactively prompt on m* cmds */
  62. int    debug;            /* debugging level */
  63. int    bell;            /* ring bell on cmd completion */
  64. int    doglob;            /* glob local file names */
  65. int    autologin;        /* establish user account on connection */
  66. int    proxy;            /* proxy server connection active */
  67. int    proxflag;        /* proxy connection exists */
  68. int    sunique;        /* store files on server with unique name */
  69. int    runique;        /* store local files with unique name */
  70. int    mcase;            /* map upper to lower case for mget names */
  71. int    ntflag;            /* use ntin ntout tables for name translation */
  72. int    mapflag;        /* use mapin mapout templates on file names */
  73. int    code;            /* return/reply code for ftp command */
  74. int    crflag;            /* if 1, strip car. rets. on ascii gets */
  75. char    pasv[64];        /* passive port for proxy data connection */
  76. char    *altarg;        /* argv[1] with no shell-like preprocessing  */
  77. char    ntin[17];        /* input translation table */
  78. char    ntout[17];        /* output translation table */
  79. #include <sys/param.h>
  80. char    mapin[MAXPATHLEN];    /* input map template */
  81. char    mapout[MAXPATHLEN];    /* output map template */
  82. char    typename[32];        /* name of file transfer type */
  83. int    type;            /* file transfer type */
  84. char    structname[32];        /* name of file transfer structure */
  85. int    stru;            /* file transfer structure */
  86. char    formname[32];        /* name of file transfer format */
  87. int    form;            /* file transfer format */
  88. char    modename[32];        /* name of file transfer mode */
  89. int    mode;            /* file transfer mode */
  90. char    bytename[32];        /* local byte size in ascii */
  91. int    bytesize;        /* local byte size in binary */
  92.  
  93. char    *hostname;        /* name of host connected to */
  94.  
  95. struct    servent *sp;        /* service spec for tcp/ftp */
  96.  
  97. #include <setjmp.h>
  98. jmp_buf    toplevel;        /* non-local goto stuff for cmd scanner */
  99.  
  100. char    line[200];        /* input line buffer */
  101. char    *stringbase;        /* current scan point in line buffer */
  102. char    argbuf[200];        /* argument storage buffer */
  103. char    *argbase;        /* current storage point in arg buffer */
  104. int    margc;            /* count of arguments on input line */
  105. char    *margv[20];        /* args parsed from input line */
  106. int     cpend;                  /* flag: if != 0, then pending server reply */
  107. int    mflag;            /* flag: if != 0, then active multi command */
  108.  
  109. int    options;        /* used during socket creation */
  110.  
  111. /*
  112.  * Format of command table.
  113.  */
  114. struct cmd {
  115.     char    *c_name;    /* name of command */
  116.     char    *c_help;    /* help string */
  117.     char    c_bell;        /* give bell when command completes */
  118.     char    c_conn;        /* must be connected to use command */
  119.     char    c_proxy;    /* proxy server may execute */
  120.     int    (*c_handler)();    /* function to call */
  121. };
  122.  
  123. struct macel {
  124.     char mac_name[9];    /* macro name */
  125.     char *mac_start;    /* start of macro in macbuf */
  126.     char *mac_end;        /* end of macro in macbuf */
  127. };
  128.  
  129. int macnum;            /* number of defined macros */
  130. struct macel macros[16];
  131. char macbuf[4096];
  132.  
  133. extern    char *tail();
  134. extern    char *index();
  135. extern    char *rindex();
  136. extern    char *remglob();
  137. extern    int errno;
  138. extern    char *mktemp();
  139. extern    char *strncpy();
  140. extern    char *strncat();
  141. extern    char *strcat();
  142. extern    char *strcpy();
  143. @
  144.  
  145.  
  146. 1.1
  147. log
  148. @Initial revision
  149. @
  150. text
  151. @d14 5
  152. @
  153.